package book;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 张宇田
 * Date: 2024-10-14
 * Time: 18:16
 */
public class Book {
    private String name;
    private String auther;
    private int price;
    private String type;
    public boolean isBored;
    public Book(String name, String auther, int price, String type/*,boolean isBored*/) {
        this.name = name;
        this.auther = auther;
        this.price = price;
        this.type = type;
    }
    public String getName(){
        return name;
    }

    @Override
    public String toString() {
        return "Book{" +
                "name='" + name + '\'' +
                ", auther='" + auther + '\'' +
                ", price=" + price +
                ", type='" + type + '\'' +
                ((isBored==false)? "未借出":"已借出")+
                '}';
    }
}
